/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.wider.foundation.concurrency;

/**
 * This interface defines the standard for tasks (e.g. Runnable) to provide method to user for them to cancelling / recalling the tasks
 * @author William Choi <avextk@gmail.com>
 */
public interface Cancellable {
    /**
     * Standard method to cancel the implementing object.
     * @return True if cancelled; false otherwise.
     */

    public boolean cancel();


    /**
     * Standard method for checking if the implementing object is cancelled.
     * @return  True if cancelled; false otherwise.
     */
    public boolean isCancelled();
}
